package com.kakarote.job.oa;

import com.kakarote.core.feign.admin.entity.AdminCompany;
import com.kakarote.core.feign.oa.OaService;
import com.kakarote.core.utils.UserUtil;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class EventNoticeJob {

    @Autowired
    private OaService oaService;


    @XxlJob("EventNoticeJob")
    public ReturnT<String> EventNoticeJobHandler(String param) {
        try {
            XxlJobLogger.log("开始执行");
            oaService.eventNoticeCron();
            XxlJobLogger.log("结束执行");
        } finally {
            UserUtil.removeUser();
        }
        return ReturnT.SUCCESS;
    }
}
